<html>
<head>
    <title>uploadExcel</title>
</head>
<script type="javascript">
    function upPolicy() {
        document.sourcefile.action = "/uploadExcel";
        var submitUrl = document.getElementById("sourcefile").attributes["action"].value;
        $.ajax({
            type: "POST",
            url: submitUrl,
            data: $('#sourcefile').serialize(),
            dataType: "json",
            success: function (result) {
                var json = JSON.parse(result);
                if (json.flag == "0" || json.flag == "1") {
                    alert(tableJson.success);
                    return;
                }
            }
        })
    }
</script>
<body>
uploadExce222222
<div>
    <form id="sourcefile" name="sourcefile" action="" method="post" enctype="multipart/form-data">
        <input style="margin-left: 20px;" id="source_file" name="sourceFile" type="file" value="选择文件" />
        <input style="margin-left: 20px;" data-loading-text="请勿重复提交" type="submit" value="上   传" onClick="upPolicy()"/>
       <!-- <input style="margin-left: 20px;"  type="submit" value="下载模板" onClick="return downloadTemplate();">-->
    </form>
</div>
</body>
</html>